package org.pan.test.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.pan.test.model.User;
import org.pan.test.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping("/user")
public class UserController {

	@Resource
	private UserService userService;
	
	@RequestMapping(value="/test",method=RequestMethod.POST)
	public String showTest(User user,HttpServletRequest request){
		request.setAttribute("name", user.getName());
		return "/test";
	}
	
}
